<?php


namespace app\user\controller;


use app\common\model\Banner;
use app\common\model\Setting as SettingModel;
use think\Controller;

class Setting extends Controller
{

    public function index()
    {
        $data=SettingModel::getAllSetting();
        $data['banner']=Banner::select();
        if(!$data['banner'])$data['banner']=[];     //没有数据的时候返回空数组
        $this->result($data,200,'');
    }

}
